package mobi.richaze.llbag.domain.model.product;

import java.util.List;

import mobi.richaze.llbag.domain.model.order.LineItem;
import mobi.richaze.llbag.domain.shared.BaseRepository;

public interface ProductRepository extends BaseRepository<Product> {
	List<Inventory> getInventory();

	List<Product> getProductsByCategory(String categoryId);

	List<Product> getProductsBySearch(String... keywords);

	int currentQtyInStock(String itemid);

	/**
	 * 用于当产生一份订单时，相应减少产品项库存数量
	 * @param items
	 */
	void takeStock(LineItem items);

	List<Item> getItemsByProduct(String productId);

	Item getItem(String itemId);

}
